﻿@model PMSMVC.Models.DocTask

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

     <fieldset>
        <legend>DocTask</legend>
        <div class="display-label">ProjectID</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.ProjectID)
        </div>

        <div class="display-label">TaskName</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.TaskName)
        </div>

        <div class="display-label">RecordTime</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.RecordTime)
        </div>

        <div class="display-label">Publisher</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Publisher)
        </div>

        <div class="display-label">BeginTime</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.BeginTime)
        </div>

        <div class="display-label">PostTime</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.PostTime)
        </div>

        <div class="display-label">Executor</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Executor)
        </div>

        <div class="display-label">Checker</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Checker)
        </div>

        <div class="display-label">TaskDetail</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.TaskDetail)
        </div>

        <div class="display-label">TaskStatus</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.TaskStatus)
        </div>
    </fieldset>
    
    <fieldset>
        <legend>DocTaskChanges</legend>
        @if (Model.DocTaskChanges.Count > 0)
    {
        <table>
            <tr>
                <th>
                    RecordTime
                </th>
                <th>
                    UserID
                </th>                
                <th>
                    ChangeDetail
                </th>
            </tr>

    @foreach (var item in Model.DocTaskChanges) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.RecordTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.UserID)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ChangeDetail)
            </td>
        </tr>
    }

</table>
            }
    </fieldset>
        
    <fieldset>
        <legend>DocTaskCheck</legend>        
    @if (Model.DocTaskCheck != null)
    {
        <div class="display-label">CheckTime</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.DocTaskCheck.CheckTime)
        </div>

        <div class="display-label">UserID</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.DocTaskCheck.UserID)
        </div>

        <div class="display-label">EndTime</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.DocTaskCheck.EndTime)
        </div>

        <div class="display-label">Remark</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.DocTaskCheck.Remark)
        </div>
    }
      </fieldset>
<p>
    @Html.ActionLink("Back to List", "Index", new { projectID = Model.ProjectID })
</p>
